package com.xg.sys.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xg.sys.entity.SysOrganizationEntity;
import com.xg.sys.entity.SysUser;
import com.xg.sys.vo.TreeVO;

import java.util.List;

/**
 * 机构表
 *
 
 * @email 825612263@qq.com
 * @date 2021-01-07 14:02:40
 */
public interface SysOrganizationService extends IService<SysOrganizationEntity> {

    /**
    *  分页列表
    * @param pageParam
    * @param data
    */
    void pageList(Page<SysOrganizationEntity> pageParam, SysOrganizationEntity data);

    boolean saveOne(SysOrganizationEntity organization);

    List<SysOrganizationEntity> getByName(String name);

    List<SysOrganizationEntity> treeList(Boolean enable, String name, String status);

    boolean updateTree(SysOrganizationEntity entity);

    void userPage(Page<SysUser> page, Long oid);

    boolean removeByIdForTree(Long id);

    /**
     * 获取树形结构-
     * @return
     */
    List<TreeVO> treeForYkk() throws NoSuchMethodException;

    List<TreeVO> treeForYkk(Long userId) throws NoSuchMethodException;

    /**
     * 根据机构id获取子集合
     * @param id
     * @return
     */
    List<SysOrganizationEntity> getByParentId(Long id);
}

